package com.wt.springsamples.controller;

import com.wt.springsamples.common.ApiResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;

@Api("文件管理")
@Controller
@RequestMapping("/api")
public class MonitorController {


    @GetMapping("/ping")
    @ResponseBody
    public ApiResult ping(@RequestParam(value = "ipAddress")String ipAddress) throws Exception {
        return ApiResult.ok();
    }

    @GetMapping("/cpuInfo")
    @ResponseBody
    public ApiResult cpuInfo(@RequestParam(value = "ipAddress")String ipAddress) throws Exception {
        return ApiResult.ok();
    }

    @GetMapping("/diskInfo")
    @ResponseBody
    public ApiResult diskInfo(@RequestParam(value = "ipAddress")String ipAddress) throws Exception {
        return ApiResult.ok();
    }

    @GetMapping("/memInfo")
    @ResponseBody
    public ApiResult memInfo(@RequestParam(value = "ipAddress")String ipAddress) throws Exception {
        return ApiResult.ok();
    }
}
